package org.mspring.mlog.entity;

import java.util.Date;
import org.mspring.nbee.db.annotation.AutoIncrement;
import org.mspring.nbee.db.annotation.Col;
import org.mspring.nbee.db.annotation.Id;
import org.mspring.nbee.db.annotation.Mappable;
import org.mspring.nbee.db.entity.BaseEntity;
import org.mspring.nbee.db.orm.EntityField;

/**
 *
 * @author Gao Youbo
 * @since 2016-06-05 10:10:14
 */
@Mappable
public class NodeEntity extends BaseEntity {

    @Id
    @AutoIncrement
    @Col(length = 19)
    private Long id;
    @Col(length = 32)
    private String parentCode;
    @Col(nullable = false, length = 32)
    private String code;
    @Col(nullable = false, length = 16)
    private String type;
    @Col(length = 512)
    private String url;
    @Col(nullable = false, length = 1)
    private boolean deleted;
    @Col(length = 512)
    private String icon;
    @Col(nullable = false, length = 64)
    private String name;
    @Col(nullable = false, length = 1)
    private boolean open;
    @Col(nullable = false, length = 1)
    private boolean clickable;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getParentCode() {
        return this.parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public boolean getDeleted() {
        return this.deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getIcon() {
        return this.icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean getOpen() {
        return this.open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public boolean getClickable() {
        return this.clickable;
    }

    public void setClickable(boolean clickable) {
        this.clickable = clickable;
    }

    public static class Fields {
        public static final EntityField id = new EntityField("id", "id", Long.class, 19, false);
        public static final EntityField parentCode = new EntityField("parentCode", "parent_code", String.class, 32, true);
        public static final EntityField code = new EntityField("code", "code", String.class, 32, false);
        public static final EntityField type = new EntityField("type", "type", String.class, 16, false);
        public static final EntityField url = new EntityField("url", "url", String.class, 512, true);
        public static final EntityField deleted = new EntityField("deleted", "deleted", boolean.class, 1, false);
        public static final EntityField icon = new EntityField("icon", "icon", String.class, 512, true);
        public static final EntityField name = new EntityField("name", "name", String.class, 64, false);
        public static final EntityField open = new EntityField("open", "open", boolean.class, 1, false);
        public static final EntityField clickable = new EntityField("clickable", "clickable", boolean.class, 1, false);
    }
}
